[MIRROR] Reactions now use volume averaged purity #1868
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Mirrored on Nova: NovaSector/NovaSector#803
Original PR: tgstation/tgstation#81246
About The Pull Request
Cause it only makes sense
Currently the purity of reagents created in a reaction is computed as follows
total sum of purity of all reagents present / total number of reagents
This is incorrect because regardless of how much "volume" of an impure/pure reagent is present the purity of the final solution is unaffected. Logically if we have more amount of an impure reagent the more impure the final solution should be & same for opposite case. This is the case for ph, where if we have a large volume of say "acidic" reagent then changes in other reagents have a small effect to the overall "acidity" of the solution. The same concept now applies for purity as well
get_average_purity()
accounts for volume thus yielding more realistic results. The effect becomes more significant with larger volumes of reagents.🆑 SyncIt21
fix: reactions now compute purity of reagents based on their volume, meaning larger amounts of reagents created will have more significant effects on the final purity of the solution
/:cl: